package tests.comunicacao;

import base.Compromisso;
import comunicacao.ConexaoBD;
import comunicacao.InterfaceCompromissoBD;
import java.sql.SQLException;
import java.util.Vector;

import org.junit.*;

public class InterfaceCompromissoBDTest {

	private static ConexaoBD con;
	private static InterfaceCompromissoBD c;
	
	@BeforeClass
	public static void globalInit() throws ClassNotFoundException, SQLException {
		con = new ConexaoBD();
		c = new InterfaceCompromissoBD(con);
	}
	
	@AfterClass
	public static void globalDeinit() {
		c = null;
		con = null;
	}
	
	@Test
	public void ConsultarCompromisso() throws SQLException {
		Compromisso com = c.consultarCompromisso(2);
		Assert.assertNotNull(com);
		Assert.assertEquals(com.getMedico().getID(), 4);
		
		Vector<Compromisso> vc = c.consultarCompromissos(4, null, null, null);
		Assert.assertNotNull(vc);
		Assert.assertEquals(vc.size(), 2);
	}

	@Test
	public void CadastrarCompromisso() throws SQLException {
		
	}
	
	@Test
	public void RemoverCompromisso() throws SQLException {
	}

	@Test
	public void EditarCompromisso() throws SQLException {
	}	
}